#include <iostream>
#include <string>
#include <unordered_map>
using namespace std;

int main(){

    string s;
    cin >> s;

    unordered_map<char,int> m;
    for(int i=0;i<s.length();i++){
        m[s[i]]++;
    }

    int minC = 0x3f3f3f;
    for(auto it = m.begin(); it != m.end(); it++){
        minC = min(minC, it->second);
    }

    int cnt = 0;
    char ac[26];

    for(auto it = m.begin();it!=m.end();it++){
        if(it->second == minC) ac[cnt++] = it->first;
    }

    string ans = "";
    for(int i=0;i<s.length();i++){
        int isdelete = 0;
        for(int j=0;j<cnt;j++){
            if(s[i] == ac[j]){
                isdelete = 1;
                break;
            }
        }
        if(isdelete) continue;
        else ans += s[i];
    }

    cout << ans << endl;
    return 0;
}